var toString = Object.prototype.toString;

var objType = toString.call({});
var boolType = toString.call(true);
var numberType = toString.call(1);
var strType = toString.call('');
var funcType = toString.call(() => {});
var arrayType = toString.call([]);
var dateType = toString.call(new Date());
var regExpType = toString.call(/f/);
var nullType = toString.call(null);
var undefinedType = toString.call(undefined); 


const type = obj => {
    return toString.call(obj);
}

export const isArray = obj => {
    return type(obj) === arrayType;
}

export const isObject = obj => {
    return type(obj) === objType;
}